Skip to content

DRY: deploy_one_click_app uses create_and_update_app#25

Open
IamJeffG wants to merge 2 commits into
ak4zh:masterfrom
IamJeffG:deploy_one_click_app-uses-create_and_update
Open

DRY: deploy_one_click_app uses create_and_update_app#25
IamJeffG wants to merge 2 commits into
ak4zh:masterfrom
IamJeffG:deploy_one_click_app-uses-create_and_update

Conversation

@IamJeffG

Copy link
Copy Markdown
Collaborator

Replaces the separate create_app/update_app/deploy_app calls with a single create_and_update_app call, making the code more DRY.

No API change or behavior change... other than that we're hoping for a side-effect from create_and_update_app's 0.10s sleeps (which had not been present in deploy_one_click_app):

We intermittently hit CapRover's "No NodeId was found" error (see caprover/caprover#930) between create_app and the first update_app, specifically when the app uses persistent data. My read from ServiceManager.updateAppDefinition is:

  1. When create_app registers a new app, CapRover appears to spin up a placeholder service for it.
  2. create_app -> _wait_until_app_ready polls on isAppBuilding but not on Swarm's task scheduling, so it can return before the new task has actually been assigned a NodeID.
  3. When update_app fires in that gap, the task exists (so CapRover doesn't return "service not found") but NodeID is still empty, hence the error.

The 0.10s sleep isn't a guaranteed fix for this gap, but it happens to sit in the right place, so worth a try. Even if it doesn't fix "No NodeId was found", this PR is still a simple DRY improvement.

IamJeffG added 2 commits July 21, 2026 09:40
Replaces the separate create_app/update_app/deploy_app calls with a
single create_and_update_app call, making the code more DRY.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant